home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _IEFormElementRadioSelect.au3 < prev    next >
Text File  |  2007-09-08  |  2KB  |  43 lines

  1. ; *******************************************************
  2. ; Example 1 - Open a browser with the form example, get reference to form, select
  3. ;                each radio button byValue, then deselect the last item leaving none selected.
  4. ;                Note: You will likely need to scroll down on the page to see the changes
  5. ; *******************************************************
  6. ;
  7. #include <IE.au3>
  8. $oIE = _IE_Example ("form")
  9. $oForm = _IEFormGetObjByName ($oIE, "ExampleForm")
  10. For $i = 1 To 5
  11.     _IEFormElementRadioSelect ($oForm, "vehicleAirplane", "radioExample", 1, "byValue")
  12.     Sleep(1000)
  13.     _IEFormElementRadioSelect ($oForm, "vehicleTrain", "radioExample", 1, "byValue")
  14.     Sleep(1000)
  15.     _IEFormElementRadioSelect ($oForm, "vehicleBoat", "radioExample", 1, "byValue")
  16.     Sleep(1000)
  17.     _IEFormElementRadioSelect ($oForm, "vehicleCar", "radioExample", 1, "byValue")
  18.     Sleep(1000)
  19.     _IEFormElementRadioSelect ($oForm, "vehicleCar", "radioExample", 0, "byValue")
  20.     Sleep(1000)
  21. Next
  22.  
  23. ; *******************************************************
  24. ; Example 2 - Open a browser with the form example, get reference to form, select
  25. ;                each radio button byIndex, then deselect the last item leaving none selected.
  26. ;                Note: You will likely need to scroll down on the page to see the changes
  27. ; *******************************************************
  28. ;
  29. #include <IE.au3>
  30. $oIE = _IE_Example ("form")
  31. $oForm = _IEFormGetObjByName ($oIE, "ExampleForm")
  32. For $i = 1 To 5
  33.     _IEFormElementRadioSelect ($oForm, 3, "radioExample", 1, "byIndex")
  34.     Sleep(1000)
  35.     _IEFormElementRadioSelect ($oForm, 2, "radioExample", 1, "byIndex")
  36.     Sleep(1000)
  37.     _IEFormElementRadioSelect ($oForm, 1, "radioExample", 1, "byIndex")
  38.     Sleep(1000)
  39.     _IEFormElementRadioSelect ($oForm, 0, "radioExample", 1, "byIndex")
  40.     Sleep(1000)
  41.     _IEFormElementRadioSelect ($oForm, 0, "radioExample", 0, "byIndex")
  42.     Sleep(1000)
  43. Next